import re

#从头开始匹配
pattern = r"\d+"
str = "我的电话号码10086,nide 10010"

resp = re.match(pattern,str)
print(resp.group())